home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / wmaainf.bst < prev    next >
Text File  |  1993-11-24  |  16KB  |  826 lines

  1. % This is WMAAINF.BST in text format, as of Jan 31, 1988.
  2. % Abteilung f"ur Angewandte Informatik bibliography style
  3. %    alphanumeric labels, aphabetical order,
  4. %    journals not abbreviated,
  5. %    quotes around article titles,
  6. %    much like the "plain" and IEEE family, from which this is adapted.
  7. %
  8. %   History
  9. %   1/31/88 (WM) Original version, by Walter M"ulner,
  10. %                Institute of Statistics and Computer Science, Univ. Vienna,
  11. %                Dept. of Applied Inf. Science
  12. %
  13. %   05/22/89 (WM) something curious happened: our well working
  14. %                Bibstyle wasn't accepted by this hirngespinstig
  15. %                new version of BIBTEX from Oren Patashnig.
  16. %                --> change all postfix notations (ha ha!)
  17. %   DO NOT MAKE ANY!! changes to this style without consulting the author
  18. %
  19. ENTRY
  20.   { address
  21.     author
  22.     booktitle
  23.     chapter
  24.     edition
  25.     editor
  26.     howpublished
  27.     institution
  28.     journal
  29.     key
  30.     month
  31.     note
  32.     number
  33.     organization
  34.     pages
  35.     publisher
  36.     school
  37.     series
  38.     title
  39.     type
  40.     volume
  41.     year
  42.   }
  43.   {}
  44.   {label extra.label sort.label}
  45.  
  46.  
  47.  
  48. INTEGERS { output.state before.all mid.sentence mid.sentenceb
  49.            after.sentence after.block }
  50.  
  51. FUNCTION {init.state.consts}
  52. { #0 'before.all :=
  53.   #1 'mid.sentence :=
  54.   #2 'mid.sentenceb  :=
  55.   #3 'after.sentence  :=
  56.   #4 'after.block :=
  57. }
  58.  
  59. STRINGS { s t }
  60. FUNCTION {output.nonnull}
  61. { 's :=
  62.   output.state mid.sentence =
  63.     { ", " * write$ }
  64.     { output.state mid.sentenceb =
  65.         { " " * write$ }
  66.         { output.state after.block =
  67.             { add.period$ write$
  68.               newline$
  69.               "\newblock " write$
  70.             }
  71.             { output.state before.all =
  72.                 'write$
  73.                 { add.period$ " " * write$ }
  74.               if$
  75.             }
  76.           if$
  77.         }
  78.       if$
  79.     }
  80.   if$
  81.   mid.sentence 'output.state :=
  82.   s
  83. }
  84.  
  85. FUNCTION {output}
  86. { 's :=
  87.   s "" =
  88.     'skip$
  89.     { s output.nonnull }
  90.   if$
  91. }
  92.  
  93. FUNCTION {output.check}
  94. { 's :=
  95.   't :=
  96.   s "" =
  97.     { "Warning: the " t * " shouldn't be empty in " * cite$ * top$ }
  98.     { s output.nonnull }
  99.   if$
  100. }
  101.  
  102. FUNCTION {output.bibitem}
  103. { newline$
  104.  
  105.   "\bibitem[" write$
  106.   label write$
  107.   "]{" write$
  108.   cite$ write$
  109.   "}" write$
  110.   newline$
  111.   ""
  112.   before.all 'output.state :=
  113. }
  114.  
  115. %  FUNCTION {blank.sep}
  116. %  { mid.sentenceb 'output.state :=
  117. %  }
  118.  
  119. FUNCTION {fin.entry}
  120. { add.period$
  121.   write$
  122.   newline$
  123. }
  124.  
  125. FUNCTION {new.block}
  126. { output.state before.all =
  127.     'skip$
  128.     { after.block 'output.state := }
  129.   if$
  130. }
  131.  
  132. FUNCTION {new.sentence}
  133. { output.state after.block =
  134.     'skip$
  135.     { output.state before.all =
  136.         'skip$
  137.         { after.sentence 'output.state := }
  138.       if$
  139.     }
  140.   if$
  141. }
  142.  
  143. FUNCTION {not}
  144. {   { #0 }
  145.     { #1 }
  146.   if$
  147. }
  148.  
  149. FUNCTION {and}
  150. {   'skip$
  151.     { pop$ #0 }
  152.   if$
  153. }
  154.  
  155. FUNCTION {or}
  156. {   { pop$ #1 }
  157.     'skip$
  158.   if$
  159. }
  160.  
  161. FUNCTION {field.or.null}
  162. { duplicate$
  163.   missing$
  164.     { pop$ "" }
  165.     'skip$
  166.   if$
  167. }
  168.  
  169. FUNCTION {italicize}
  170. { 's :=
  171.   s "" =
  172.     { "" }
  173.     { "{\it " s * "}" * }
  174.   if$
  175. }
  176.  
  177. INTEGERS { nameptr namesleft numnames }
  178. STRINGS {nameresult}
  179. FUNCTION {format.names}
  180. { 's :=
  181.   #1 'nameptr :=
  182.   "" 'nameresult :=
  183.   s num.names$ 'numnames :=
  184.   numnames 'namesleft :=
  185.     { namesleft #0 > }
  186.     {
  187.  
  188.       s nameptr "{f.~}{vv~}{ll}{,~jj}" format.name$ 't :=
  189.  
  190.       nameptr #1 >
  191.         { namesleft #1 >
  192.             { nameresult ", " * t * 'nameresult := }
  193.             { numnames #2 >
  194.                 { nameresult "," * 'nameresult := }
  195.                 'skip$
  196.               if$
  197.               t "others" = t "et.al." = or t "et. al." = or
  198.                 { nameresult " {\it et al.}" * 'nameresult := }
  199.                 { nameresult " and " * t * 'nameresult := }
  200.               if$
  201.             }
  202.           if$
  203.         }
  204.         { nameresult t * 'nameresult := }
  205.       if$
  206.       nameptr #1 + 'nameptr :=
  207.       namesleft #1 - 'namesleft :=
  208.     }
  209.   while$
  210.   nameresult
  211. }
  212.  
  213. FUNCTION {format.authors}
  214. { author missing$
  215.     { "" }
  216.     { author format.names }
  217.   if$
  218. }
  219.  
  220. FUNCTION {format.editors}
  221. { editor missing$
  222.     { "" }
  223.     { editor num.names$ #1 >
  224.         { editor format.names ", Eds." * }
  225.         { editor format.names ", Ed." * }
  226.       if$
  227.     }
  228.   if$
  229. }
  230.  
  231. FUNCTION {format.title}
  232.  
  233. { title missing$
  234.     { "" }
  235.     { "``" title * "''" * }
  236.   if$
  237.  
  238. }
  239.  
  240. FUNCTION {entry.string.max} { #100 }
  241.  
  242. FUNCTION {global.string.max} { #300 }
  243.  
  244. STRINGS {pageresult}
  245.  
  246. FUNCTION {n.dashify}
  247. { 't :=
  248.   "" 'pageresult :=
  249.     { t "" = not }
  250.     { t #1 #1 substring$ "-" =
  251.         { t #1 #2 substring$ "--" = not
  252.             { pageresult "--" * 'pageresult :=
  253.               t #2 global.string.max substring$ 't :=
  254.             }
  255.             {   { t #1 #1 substring$ "-" = }
  256.                 { pageresult "-" * 'pageresult :=
  257.                   t #2 global.string.max substring$ 't :=
  258.                 }
  259.               while$
  260.             }
  261.           if$
  262.         }
  263.         { pageresult t #1 #1 substring$ * 'pageresult :=
  264.           t #2 global.string.max substring$ 't :=
  265.         }
  266.       if$
  267.     }
  268.   while$
  269.   pageresult
  270. }
  271.  
  272. FUNCTION {format.date}
  273. { year missing$
  274.     { month missing$
  275.         { "" }
  276.         { "Warning: there's a month but no year in " cite$ * top$
  277.           month
  278.         }
  279.       if$
  280.     }
  281.     { month missing$
  282.         { year }
  283.         { month " " * year * }
  284.       if$
  285.     }
  286.   if$
  287. }
  288.  
  289. FUNCTION {format.btitle}
  290. { title field.or.null
  291.   italicize
  292. }
  293.  
  294. FUNCTION {format.bvolume}
  295. { volume missing$
  296.     { series missing$
  297.         { "" }
  298.         { series italicize }
  299.       if$
  300.     }
  301.     { "Vol.~" volume *
  302.       series missing$
  303.         'skip$
  304.         { " of " * series italicize * }
  305.       if$
  306.     }
  307.   if$
  308. }
  309.  
  310. FUNCTION {format.edition}
  311. { edition missing$
  312.     { "" }
  313.     { edition "l" change.case$ " Ed." * }
  314.   if$
  315. }
  316.  
  317. INTEGERS {multiresult}
  318. FUNCTION {multi.page.check}
  319. { 't :=
  320.   #0 'multiresult :=
  321.     { multiresult not
  322.       t "" = not
  323.       and
  324.     }
  325.     { t #1 #1 substring$ "-" =
  326.       t #1 #1 substring$ "," =
  327.       or
  328.         { #1 'multiresult := }
  329.         { t #2 global.string.max substring$ 't := }
  330.       if$
  331.     }
  332.   while$
  333.   multiresult
  334. }
  335.  
  336. FUNCTION {format.pages}
  337. { pages missing$
  338.     { "" }
  339.     { pages multi.page.check
  340.         { "pp.~" pages n.dashify * }
  341.         { "p.~" pages n.dashify * }
  342.       if$
  343.     }
  344.   if$
  345. }
  346.  
  347. FUNCTION {format.volume}
  348. { volume missing$
  349.     { "" }
  350.     { "Vol.~" volume * }
  351.   if$
  352. }
  353.  
  354. FUNCTION {format.number}
  355. { number missing$
  356.     { "" }
  357.     { "No.~" number * }
  358.   if$
  359. }
  360.  
  361. FUNCTION {format.chapter.pages}
  362. { chapter missing$
  363.     'format.pages
  364.     { "Chap.~" chapter *
  365.       pages missing$
  366.         'skip$
  367.         { ", " * format.pages * }
  368.       if$
  369.     }
  370.   if$
  371. }
  372.  
  373. FUNCTION {format.in.ed.booktitle}
  374. { booktitle missing$
  375.     { "" }
  376.     { format.editors 't :=
  377.       t "" =
  378.         { "In: " booktitle italicize * }
  379.         { "In: " t * ", " * booktitle italicize * }
  380.       if$
  381.     }
  382.   if$
  383. }
  384.  
  385. FUNCTION {format.tr.number}
  386. { type missing$
  387.     { "Tech. Rep." }
  388.     { type }
  389.   if$
  390.   number missing$
  391.     'skip$
  392.     { "~" * number * }
  393.   if$
  394. }
  395.  
  396. FUNCTION {article}
  397. { output.bibitem
  398.   "author" format.authors output.check
  399.   new.block
  400.   "title" format.title output.check
  401.   new.block
  402.   "journal" journal field.or.null italicize output.check
  403.   format.volume output
  404.   format.number output
  405.   format.pages output
  406.   "year" format.date output.check
  407.   new.block
  408.   note field.or.null output
  409.   fin.entry
  410. }
  411.  
  412. FUNCTION {book}
  413. { output.bibitem
  414.   author missing$
  415.     { "author and editor" format.editors output.check }
  416.     { "author" format.authors output.check }
  417.   if$
  418.   new.block
  419.   "title" format.btitle output.check
  420.   new.block
  421.   format.bvolume output
  422.   "publisher" publisher field.or.null output.check
  423.   address field.or.null output
  424.   format.edition output
  425.   "year" format.date output.check
  426.   new.block
  427.   note field.or.null output
  428.   fin.entry
  429. }
  430.  
  431. FUNCTION {booklet}
  432. { output.bibitem
  433.   format.authors output
  434.   new.block
  435.   "title" format.btitle output.check
  436.   new.block
  437.   howpublished field.or.null output
  438.   address field.or.null output
  439.   format.date output
  440.   new.block
  441.   note field.or.null output
  442.   fin.entry
  443. }
  444.  
  445. FUNCTION {inbook}
  446. { output.bibitem
  447.   author missing$
  448.     { "author and editor" format.editors output.check }
  449.     { "author" format.authors output.check }
  450.   if$
  451.   new.block
  452.   "title" format.btitle output.check
  453.   "chapter and pages" format.chapter.pages output.check
  454.   new.block
  455.   format.bvolume output
  456.   "publisher" publisher field.or.null output.check
  457.   address field.or.null output
  458.   format.edition output
  459.   "year" format.date output.check
  460.   new.block
  461.   note field.or.null output
  462.   fin.entry
  463. }
  464.  
  465. FUNCTION {incollection}
  466. { output.bibitem
  467.   "author" format.authors output.check
  468.   new.block
  469.   "title" format.title output.check
  470.   new.block
  471.   "booktitle" format.in.ed.booktitle output.check
  472.   format.chapter.pages output
  473.   "publisher" publisher field.or.null output.check
  474.   address field.or.null output
  475.   "year" format.date output.check
  476.   new.block
  477.   note field.or.null output
  478.   fin.entry
  479. }
  480.  
  481. FUNCTION {inproceedings}
  482. { output.bibitem
  483.   "author" format.authors output.check
  484.   new.block
  485.   "title" format.title output.check
  486.   new.block
  487.   "booktitle" format.in.ed.booktitle output.check
  488.   format.pages output
  489.   organization field.or.null output
  490.   publisher field.or.null output
  491.   address field.or.null output
  492.   "year" format.date output.check
  493.   new.block
  494.   note field.or.null output
  495.   fin.entry
  496. }
  497.  
  498. FUNCTION {conference} { inproceedings }
  499.  
  500. FUNCTION {manual}
  501. { output.bibitem
  502.   format.authors output
  503.   new.block
  504.   "title" format.btitle output.check
  505.   new.block
  506.   organization field.or.null output
  507.   address field.or.null output
  508.   format.edition output
  509.   format.date output
  510.   new.block
  511.   note field.or.null output
  512.   fin.entry
  513. }
  514.  
  515. FUNCTION {mastersthesis}
  516. { output.bibitem
  517.   "author" format.authors output.check
  518.   new.block
  519.   "title" format.btitle output.check
  520.   new.block
  521.   "Master's thesis" output
  522.   "school" school field.or.null output.check
  523.   address field.or.null output
  524.   "year" format.date output.check
  525.   new.block
  526.   note field.or.null output
  527.   fin.entry
  528. }
  529.  
  530. FUNCTION {misc}
  531. { output.bibitem
  532.   format.authors output
  533.   new.block
  534.   format.title output
  535.   new.block
  536.   howpublished field.or.null output
  537.   format.date output
  538.   new.block
  539.   note field.or.null output
  540.   fin.entry
  541. }
  542.  
  543. FUNCTION {phdthesis}
  544. { output.bibitem
  545.   "author" format.authors output.check
  546.   new.block
  547.   "title" format.btitle output.check
  548.   new.block
  549.   "PhD thesis" output
  550.   "school" school field.or.null output.check
  551.   address field.or.null output
  552.   "year" format.date output.check
  553.   new.block
  554.   note field.or.null output
  555.   fin.entry
  556. }
  557.  
  558. FUNCTION {proceedings}
  559. { output.bibitem
  560.   editor missing$
  561.     { organization missing$
  562.         'skip$
  563.         { organization field.or.null output }
  564.       if$
  565.     }
  566.     { format.editors output }
  567.   if$
  568.   new.block
  569.   "title" format.btitle output.check
  570.   editor missing$
  571.     'skip$
  572.     { organization field.or.null output }
  573.   if$
  574.   publisher field.or.null output
  575.   address field.or.null output
  576.   "year" format.date output.check
  577.   new.block
  578.   note field.or.null output
  579.   fin.entry
  580. }
  581.  
  582. FUNCTION {techreport}
  583. { output.bibitem
  584.   "author" format.authors output.check
  585.   new.block
  586.   "title" format.title output.check
  587.   new.block
  588.   format.tr.number output
  589.   "institution" institution field.or.null output.check
  590.   address field.or.null output
  591.   "year" format.date output.check
  592.   new.block
  593.   note field.or.null output
  594.   fin.entry
  595. }
  596.  
  597. FUNCTION {unpublished}
  598. { output.bibitem
  599.   "author" format.authors output.check
  600.   new.block
  601.   "title" format.title output.check
  602.   new.block
  603.   format.date output
  604.   new.block
  605.   "note" note field.or.null output.check
  606.   fin.entry
  607. }
  608.  
  609. FUNCTION {default.type}
  610. { "Warning: unknown entry: " type$ * " in " * cite$ * top$ }
  611.  
  612. MACRO {jan} {"Jan."}
  613. MACRO {feb} {"Feb."}
  614. MACRO {mar} {"March"}
  615. MACRO {apr} {"Apr."}
  616. MACRO {may} {"May"}
  617. MACRO {jun} {"June"}
  618. MACRO {jul} {"July"}
  619. MACRO {aug} {"Aug."}
  620. MACRO {sep} {"Sep."}
  621. MACRO {oct} {"Oct."}
  622. MACRO {nov} {"Nov."}
  623. MACRO {dec} {"Dec."}
  624. MACRO {acmcs} {"ACM Computing Surveys"}
  625. MACRO {acta} {"Acta Informatica"}
  626. MACRO {cacm} {"Communications ACM"}
  627. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  628. MACRO {ibmsj} {"IBM Systems Journal"}
  629. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  630. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  631. MACRO {ieeetcad}
  632.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  633. MACRO {ipl} {"Information Processing Letters"}
  634. MACRO {jacm} {"Journal of the ACM"}
  635. MACRO {jcss} {"Journal of Computer and System Sciences"}
  636. MACRO {scp} {"Science of Computer Programming"}
  637. MACRO {sicomp} {"SIAM Journal on Computing"}
  638. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  639. MACRO {tods} {"ACM Transactions on Database Systems"}
  640. MACRO {tog} {"ACM Transactions on Graphics"}
  641. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  642. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  643. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  644. MACRO {tcs} {"Theoretical Computer Science"}
  645.  
  646. READ
  647.  
  648. FUNCTION {sortify}
  649. { purify$
  650.   "l" change.case$
  651. }
  652.  
  653. FUNCTION {format.lab.names}
  654. { #1 "{ll}" format.name$
  655.   duplicate$ duplicate$ " -> " swap$
  656.   purify$ * * top$
  657.   purify$
  658.   #1 #4 substring$
  659.   % nur erste 4 Zeichen des Namens als Citation-Key
  660. }
  661.  
  662. FUNCTION {calc.label}
  663. {
  664.   author missing$
  665.     { editor missing$
  666.         { key missing$
  667.             { "Warning: need a key to make a label in " cite$ * top$
  668.               title field.or.null purify$ #1 #4 substring$
  669.             }
  670.             { key purify$
  671.               #1 #8 substring$}
  672.           if$
  673.         }
  674.         { editor format.lab.names}
  675.       if$
  676.     }
  677.     { author format.lab.names}
  678.   if$
  679.   year field.or.null purify$ #-1 #2 substring$ 'sort.label :=
  680.   sort.label "" =
  681.     { skip$ }
  682.     { "~" * sort.label * }
  683.   if$
  684.  
  685.   'label
  686.   :=
  687.   label sortify 'sort.label :=
  688. }
  689.  
  690. FUNCTION {sort.format.names}
  691. { 's :=
  692.   #1 'nameptr :=
  693.   "" 'nameresult :=
  694.   s num.names$ 'numnames :=
  695.   numnames 'namesleft :=
  696.     { namesleft #0 > }
  697.       { nameptr #1 >
  698.         { nameresult "   " * 'nameresult := }
  699.         'skip$
  700.       if$
  701.       s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  702.       nameptr numnames = t "others" = t "et.al." = or t "et. al." = or and
  703.         { nameresult "et al" * 'nameresult := }
  704.         { nameresult t sortify * 'nameresult := }
  705.       if$
  706.       nameptr #1 + 'nameptr :=
  707.       namesleft #1 - 'namesleft :=
  708.       }
  709.     while$
  710.   nameresult
  711. }
  712.  
  713. INTEGERS {len}
  714.  
  715. FUNCTION {chop.word}
  716. { 's :=
  717.   'len :=
  718.   s #1 len substring$ =
  719.     { s len #1 + global.string.max substring$ }
  720.     { s }
  721.   if$
  722. }
  723.  
  724. FUNCTION {sort.format.title}
  725. { 't :=
  726.   "A " #2
  727.     "An " #3
  728.       "The " #4 t chop.word
  729.     chop.word
  730.   chop.word
  731.   #1 global.string.max substring$
  732.   sortify
  733. }
  734.  
  735. FUNCTION {presort}
  736. {
  737.   calc.label
  738.   sort.label
  739.   "    "
  740.   *
  741.   author missing$
  742.     { editor missing$
  743.         { key field.or.null sortify }
  744.         { editor sort.format.names }
  745.       if$
  746.     }
  747.     { author sort.format.names }
  748.   if$
  749.   *
  750.   "    "
  751.   *
  752.   title field.or.null
  753.   sort.format.title
  754.   *
  755.   #1 entry.string.max substring$
  756.   'sort.key$ :=
  757. }
  758.  
  759. ITERATE {presort}
  760.  
  761. SORT
  762.  
  763. STRINGS { longest.label last.sort.label next.extra }
  764.  
  765. INTEGERS { longest.label.width last.extra.num }
  766.  
  767. FUNCTION {initialize.longest.label}
  768. { "" 'longest.label :=
  769.   "" 'last.sort.label :=
  770.   "" 'next.extra :=
  771.   #0 'longest.label.width :=
  772.   #0 'last.extra.num :=
  773. }
  774.  
  775. FUNCTION {forward.pass}
  776. { last.sort.label sort.label =
  777.     { last.extra.num #1 + 'last.extra.num :=
  778.       last.extra.num int.to.chr$ 'extra.label :=
  779.     }
  780.     { "a" chr.to.int$ 'last.extra.num :=
  781.       "" 'extra.label :=
  782.       sort.label 'last.sort.label :=
  783.     }
  784.   if$
  785. }
  786.  
  787. FUNCTION {reverse.pass}
  788. { next.extra "b" =
  789.     { "a" 'extra.label := }
  790.     'skip$
  791.   if$
  792.   label extra.label * 'label :=
  793.   label width$ longest.label.width >
  794.     { label 'longest.label :=
  795.       label width$ 'longest.label.width :=
  796.     }
  797.     'skip$
  798.   if$
  799.   extra.label 'next.extra :=
  800. }
  801.  
  802. EXECUTE {initialize.longest.label}
  803.  
  804. ITERATE {forward.pass}
  805.  
  806. REVERSE {reverse.pass}
  807.  
  808. FUNCTION {preamble}
  809. {
  810.   preamble$ duplicate$ empty$
  811.     'pop$
  812.     { write$ newline$ }
  813.   if$
  814.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  815. }
  816.  
  817. EXECUTE {preamble}
  818.  
  819. EXECUTE {init.state.consts}
  820.  
  821. ITERATE {call.type$}
  822.  
  823. FUNCTION {finish.up} { newline$ "\end{thebibliography}" write$ newline$ }
  824.  
  825. EXECUTE {finish.up}
  826.